package service.impl;

import javax.persistence.EntityManager;

import models.Cart;
import processor.CartProcessor;
import service.CartService;

public class CartServiceImpl extends AbstractServiceImpl implements CartService {

    protected Cart dbcart;

    public CartServiceImpl() {
        this.dbcart = new Cart();
    }

    public CartServiceImpl(Cart cart) {
        this.dbcart = cart;
    }
    
    
    
    public CartServiceImpl(Integer aid, double amount){
        this.dbcart = new Cart(aid, amount);
    }

    @Override
    public CartProcessor getProcessor() {
        // TODO Auto-generated method stub
        return new CartProcessor(this.dbcart);
    }

    public Cart getDbcart() {
        return dbcart;
    }

    public void setDbcart(Cart dbcart) {
        this.dbcart = dbcart;
    }
    
    

}
